package visitor;

/**
 * 元素接口或者抽象类，它定义了一个接受访问者的方法（Accept），其意义是指每一个元素都要可以被访问者访问。
 * Created by yuvenhol on 2018-3-29.
 */

public abstract class Element {
    private double amount;
    private String item;
    public abstract void accept(Visitor visitor);

    public Element(double amount, String item) {
        this.amount = amount;
        this.item = item;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public String getItem() {
        return item;
    }

    public void setItem(String item) {
        this.item = item;
    }
}
